//
//  QQRequestManager+handle.h
//  LClass
//
//  Created by 严军 on 16/5/29.
//  Copyright © 2016年 YanJun. All rights reserved.
//

#import "QQRequestManager.h"

//服务器根地址
#define URL_Sever @"http://192.168.1.1/LClass"

/*             用户相关                 */
//登录 GET: username/password
#define URL_login [URL_Sever stringByAppendingString:@"/login"]

//注册 GET: username/password/code(手机号)
#define URL_register [URL_Sever stringByAppendingString:@"/register"]

//获取考勤数据 GET: className/type/
#define URL_kaoqinData [URL_Sever stringByAppendingString:@"/kaoqinData"]


@interface QQRequestManager (handle)

/*
 *操作本地数据库NSUserDeful
 *
 */

-(void)SET_userInfo:(NSDictionary*)infoDic;

-(NSDictionary*)GET_userInfo;

/**
 *  登录
 *  @param parameters username/password
 *  @param success  default
 *  @param failure  default
 *  
 *  @return default
 */
-(NSURLSessionDataTask *)GET_loginWithParameters:(id)parameters success:(void(^)(NSURLSessionDataTask* task,id responseObject)) success failure:(void(^)(NSURLSessionDataTask* task,NSError *error)) failure;

/**
 *  注册
 *  @param parameters username/password/phone
 *  @param success  default
 *  @param failure  default
 *
 *  @return default
 */
-(NSURLSessionDataTask *)GET_registerWithParameters:(id)parameters success:(void(^)(NSURLSessionDataTask* task,id responseObject)) success failure:(void(^)(NSURLSessionDataTask* task,NSError *error)) failure;

/**
 *  考勤数据
 *  @param parameters className/Type
 *  @param success  default
 *  @param failure  default
 *
 *  @return default
 */
-(NSURLSessionDataTask *)GET_kaoQinDataWithParameters:(id)parameters success:(void(^)(NSURLSessionDataTask* task,id responseObject)) success failure:(void(^)(NSURLSessionDataTask* task,NSError *error)) failure;

@end
